package com.itheima.controller;

import com.itheima.Service.ServeProjectService;
import com.itheima.pojo.ServeProject;
import com.itheima.pojo.query.PageQuery;
import com.itheima.pojo.vo.PageResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/serve/project")
public class ServeProjectController {

    private ServeProjectService serveProjectService;

    @GetMapping("/list")
    public PageResult page(@RequestBody PageQuery<ServeProject> pageQuery){
        PageResult pageResult= serveProjectService.page(pageQuery);
        return pageResult;

    }
}
